package com.curso.service;


import java.io.Serializable;
import java.util.List;



/**
 * This class serves as the Base class for all other Managers - namely to hold
 * common CRUD methods that they might all use. You should only need to extend
 * this class when your require custom CRUD logic.
 *

 *
 * @author <a href="mailto:matt@raibledesigns.com">Matt Raible</a>
 * @param <T> a type variable
 * @param <PK> the primary key for that type
 */
public abstract class GenericService<T, PK extends Serializable>  {



    public GenericService() {}


    /**
     * {@inheritDoc}
     */
    public abstract List<T> getAll();

    /**
     * {@inheritDoc}
     */
    public abstract T get(PK id);

    /**
     * {@inheritDoc}
     */
    public  abstract boolean exists(PK id);

    /**
     * {@inheritDoc}
     */
    public abstract T save(T object);

    /**
     * {@inheritDoc}
     */
    public abstract void remove(PK id);
}
